
class AttributeMixin {

    static mixin() {
        
        Attributable.metaClass.addAttribute = { String name, value ->
            println " ===> ${name}:${value}"
            println " ===> delegate.id: ${delegate.id}"
            println " ===> delegate.toString(): ${delegate.toString()}"
            println " ===> delegate: ${delegate.properties}"
        }

    }
/*
    static def aaa = { self ->
        println " --> CAlling AAAAaaa"
        println " => this: " + this
        println " => self: " + self
        println " => delegate: " + delegate 
    }

    static def addAttribute(self, String name, String value) {
        println "Adding string: ${name} = ${value} "
        println " => self: " + self
        println " => self.class: " + self.properties
        println " => self.id: " + self.id
    }

    static def addAttribute(self, String name, double value) {
        println "self=${self} Adding number ${name} = ${value} "
        println " => self.class: " + self.properties
        println " => self.id: " + self.id
    }

    def addAttribute(self, String name, boolean value) {
        println "Adding boolean: ${name} = ${value} "
    }
*/
}

